#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project ：turbo 
@File    ：urls.py
@Author  ：赵加响
@Date    ：2023/4/23 10:38 
@Desc    ：改模块下的接口不进行鉴权
"""
from django.urls import path, include
from rest_framework.routers import DefaultRouter

from apps.codetable.views import CodeTableViewSet
from apps.common.views import RoleDropdownViewSet, MenuDropdownViewSet, FileResponseApi

common_router = DefaultRouter()
common_router.register('role', RoleDropdownViewSet, 'Role Dropdown List Api')
common_router.register('menu', MenuDropdownViewSet, 'Menu Dropdown List Api')
# Code Table 通用下拉框列表接口
common_router.register('code_table', CodeTableViewSet, 'Code Table Dropdown List Api')

dropdown_urlpatterns = [
    path('', include(common_router.urls))
]

common_urlpatterns = [
    path('dropdown/', include(dropdown_urlpatterns)),
    path('file_response/<str:path>/<int:path_level>/<str:filename>/<str:download_name>/', FileResponseApi.as_view(),
         name='File Response Api'),
]
